package com.sicau.socialpracticesystem.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sicau.socialpracticesystem.entity.param.PageParam;
import com.sicau.socialpracticesystem.entity.param.teammember.TeamApplyParam;
import com.sicau.socialpracticesystem.entity.param.teammember.TeamApplyQueryParam;
import com.sicau.socialpracticesystem.entity.po.TeamMember;
import com.sicau.socialpracticesystem.entity.vo.PageDataVO;
import com.sicau.socialpracticesystem.entity.vo.teammember.TeamMemberVO;

import java.util.List;

/**
 * <p>
 * 团队成员信息表 服务类
 * </p>
 *
 * @author sxt && ttxxi
 * @since 2021-04-26
 */
public interface TeamMemberService extends IService<TeamMember> {

    /**
     * 根据团队id和用户id查询
     */
    TeamMember queryByTeamIdAndUserId(Integer teamId, Integer userId);

    /**
     * 根据团队id查询团队成员信息
     *
     * @param teamId 团队id
     */
    PageDataVO<TeamMemberVO> queryTeamMemberByTeamId(Integer teamId, PageParam pageParam);

    /**
     * 根据团队id查询团队成员信息
     *
     * @param teamId 团队id
     */
    List<TeamMemberVO> queryTeamMemberByTeamId(Integer teamId);

    /**
     * 获取团队成员申请信息（只有队长调用有结果）
     */
    PageDataVO<TeamMemberVO> getTeamsApplyMembers(TeamApplyQueryParam teamApplyQueryParam);

    /**
     * 当前用户申请加入团队
     */
    void applyTeam(TeamApplyParam teamApplyParam);

}
